import request from '@/api/server.js'

export function getCustomerList(params) {
  return request({
    url: '/customers',
    method: 'get',
    params,
  })
}

export function saveCustomer(data) {
  return request({
    url: '/customers',
    method: 'post',
    data,
  })
}

export function updateCustomer(data) {
  return request({
    url: '/customers',
    method: 'put',
    data,
  })
}

export function deleteCustomer(customerId) {
  return request({
    url: `/customers/${customerId}`,
    method: 'delete',
  })
}

export function updataOwnerUser(params) {
  return request({
    url: '/customers/owner',
    method: 'put',
    params,
  })
}

export function updataDealStatus(params) {
  return request({
    url: '/customers/dealStatus',
    method: 'put',
    params,
  })
}
